package com.aliyun.oss.mapper;

import com.aliyun.oss.pojo.Entity.SetMeal;
import com.aliyun.oss.pojo.Vo.SetMealVO;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface SetMealMapper extends BaseMapper<SetMeal> {
    @Select("SELECT s.id,s.`name`,s.image,c.`name` category_name,s.price,s.`status`,s.update_time FROM setmeal s LEFT JOIN category c ON s.category_id=c.id")
    List<SetMealVO> getAllSetmeal();

    List<SetMealVO> querySetMealLikeByNameOrCategoryIdOrStatus(String name, Integer categoryId, Integer status);
}
